<?php
//connexion SQL.
$sql=$_GET['req'];
echo $sql;
print "je lance my connexion";
if ($bdd =mysqli_connect('localhost', 'root', 'root', 'top14')){
	print "connexion reussie";
}
else // Mais si elle rate…
{
	print 'Erreur'; // On affiche un message d'erreur.
}
//verify connection
if($bdd->connect_errno > 0){
	die('Unable to connect to database [' . $db->connect_error . ']');
}
else {
	print "connexion reussie";
}
print "je lance la requete  ";
echo '<br/>';
$resultat = mysqli_query($bdd, $sql);

echo $nomchamps;
while($donnees = mysqli_fetch_assoc($resultat))
{
	foreach ($donnees as $result){
		print $result;
	}
	echo '<br/>';
	//echo $donnees['logo'];
}
mysqli_free_result($resultat);
?> 

